import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/Login/HomeView.vue'
import sy from '../views/Sy.vue'
import side from '../components/Side.vue'
import sy_ from '../components/Sy_.vue'
import yhgl from '../components/Yhgl.vue'
import stor_keep from '../components/storekeeping/Store_keeping.vue'
import Email_doing from '../components/Email/Email_doing.vue'
import Money_enter from '../components/Money_in/Money_enter.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/sy',
    name: 'sy',
    component: sy,
    redirect: '/sy_',
    children: [
      {
        path: '/sy_',
        name: 'sy_',
        component: sy_
      },
      {
        path: '/side',
        name: 'side',
        component: side
      },
      {
        path: '/yhgl',
        name: 'yhgl',
        component: yhgl
      },
      {
        path: '/stor_keep',
        name: 'stor_keep',
        component: stor_keep
      },
      {
        path: '/Email_doing',
        name: 'Email_doing',
        component: Email_doing
      },
      {
        path: '/Money_enter',
        name: 'Money_enter',
        component: Money_enter
      },
    ]
  },

  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
